# coding: utf-8
from qfluentwidgets import MessageBoxBase, CheckBox, BodyLabel, setFont


class DeleteDialog(MessageBoxBase):
    def __init__(self, parent=None):
        super().__init__(parent)
        self.titleLabel = BodyLabel(self.tr('删除任务'), self)
        self.contentLabel = BodyLabel(self.tr('确定要删除该任务吗？'), self)
        self.deleteFileCheckBox = CheckBox('删除本地文件', self)

        self.deleteFileCheckBox.setChecked(True)
        self.widget.setMinimumSize(330, 200)

        setFont(self.titleLabel, 20)

        self.viewLayout.addWidget(self.titleLabel)
        self.viewLayout.addWidget(self.contentLabel)
        self.viewLayout.addWidget(self.deleteFileCheckBox)

    def isChecked(self):
        return self.deleteFileCheckBox.isChecked()
